package com.googlecode.bip.xml.export;

import java.io.IOException;

/**
 * TODO: doc
 *
 * @author Claude CHOISNET
 */
//not public
class XMLValueDescriptions  implements XMLAppender
{
    private int value;
    private String valuedescription;

    /**
     * TODO: doc
     *
     * @param value
     * @param valuedescription
     */
    public XMLValueDescriptions( int value, String valuedescription )
    {
        this.value = value;
        this.valuedescription = valuedescription;
    }

    /**
     * <XMP>
     * <!ELEMENT valuedescriptions (value,valuedescription)>
     * <!ELEMENT value             (#PCDATA)>
     * <!ELEMENT valuedescription  (#PCDATA)>
     * </XMP>
     */
    @Override
    public void appendXML( Appendable a ) throws IOException
    {
        a.append( "<valuedescriptions>\n" );

        XMLAppenderHelper.appendXMLValue( a, "value", value );
        XMLAppenderHelper.appendXMLValue( a, "valuedescription", valuedescription );

        a.append( "</valuedescriptions>\n" );
    }

}
